<template>
  <div class="detail">
    <div class="detail-title">{{ msg.subjectName }}</div>
    <div class="test-top">
      <div class="test-top-left"></div>
      <div class="test-top-right">课题详情</div>
    </div>
    <div class="play-content">
      <div class="subject">
        <div class="title">项目描述</div>
        <div class="content">{{ msg.subjectDetails }}</div>
      </div>
      <div class="subject">
        <div class="title">项目难度</div>
        <div class="content">{{ msg.difficulty }}</div>
      </div>
      <div class="subject">
        <div class="title">产出标准</div>
        <div class="content">{{ msg.outputStandard }}</div>
      </div>
      <div class="subject">
        <div class="title">技术要求</div>
        <div class="content">{{ msg.skillsRequirement }}</div>
      </div>
      <div class="subject ">
        <div class="title">相关项目</div>
        <div class="content newC">
          {{ msg.relatedReferences }}
        </div>
      </div>
    </div>
    <div class="test-top">
      <div class="test-top-left"></div>
      <div class="test-top-right">导师简介</div>
    </div>
    <div class="play-content">
      {{ msg.facultyProfile }}
    </div>
    <div class="btn">
      <el-button
        v-if="msg.signUpStatus == '待申请'"
        type="primary"
        @click="register"
        >立即报名</el-button
      >
      <el-button v-else :class="{ newCLass: msg.signUpStatus != '待申请' }"
        >立即报名</el-button
      >
      <el-button @click="goback">返回</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      msg: {},
    };
  },
  created() {
    this.msg = Object.assign(
      {},
      this.msg,
      JSON.parse(sessionStorage.getItem("newdetail"))
    );
    console.log(this.msg);
  },
  methods: {
    goback() {
      this.$router.push("/mainPlay");
    },
    register() {
      this.$router.push("/register");
    },
  },
};
</script>
<style lang="less" scoped>
.detail {
  height: 100%;
  padding: 0 340px;
  .detail-title {
    display: flex;
    justify-content: center;
    height: 48px;
    font-size: 36px;
    font-weight: 400;
    line-height: 48px;
    color: #000000;
    opacity: 0.9;
    margin-top: 56px;
  }
  .test-top {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 40px;
    .test-top-left {
      width: 4px;
      height: 24px;
      background: #385bbc;
      margin-right: 12px;
    }
    .test-top-right {
      height: 32px;
      font-size: 24px;
      font-weight: 400;
      line-height: 32px;
      color: #000000;
      opacity: 0.9;
    }
  }
  .play-content {
    margin-bottom: 60px;
    .subject {
      margin-bottom: 10px;
      .title {
        width: 56px;
        border-bottom: 2px solid #385bbc;
      }
      .content {
        text-indent: 2em;
        font-size: 14px;
        font-weight: 400;
        line-height: 28px;
        color: #000000;
        opacity: 0.9;
      }
      .newC {
        margin-left: 2em;
        text-indent: 0;
        white-space: pre-wrap;
      }
    }
  }
  .btn {
    text-align: center;
    ::v-deep .el-button--primary {
      width: 168px;
      font-size: 18px;
      height: 48px;
      background: linear-gradient(90deg, #e048fd 0%, #006fff 100%);
      border-radius: 2px;
      margin-right: 20px;
    }
    ::v-deep .el-button--default {
      width: 168px;
      font-size: 18px;
      height: 48px;
      border-radius: 2px;
    }
    .newCLass {
      background: #b4b4b4;
      color: #606266;
      &:hover {
        cursor: not-allowed;
      }
    }
  }
}
@media screen and (max-width: 500px) {
  .detail {
    padding: 0 10px;
    .detail-title {
      font-size: 26px;
    }
    .btn {
      display: flex;
    }
    .subject {
      .content.newC {
        margin-left: 2em;
        text-indent: 0;
        white-space: pre-wrap;
        word-break: break-all;
      }
    }
  }
}
</style>
